/*
 * XML Type:  AccountInfo
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.AccountInfo
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML AccountInfo(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class AccountInfoImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.ofx.types.x2003.x04.AccountInfo
{
    
    public AccountInfoImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName DESC$0 = 
        new javax.xml.namespace.QName("", "DESC");
    private static final javax.xml.namespace.QName PHONE$2 = 
        new javax.xml.namespace.QName("", "PHONE");
    private static final javax.xml.namespace.QName BANKACCTINFO$4 = 
        new javax.xml.namespace.QName("", "BANKACCTINFO");
    private static final javax.xml.namespace.QName CCACCTINFO$6 = 
        new javax.xml.namespace.QName("", "CCACCTINFO");
    private static final javax.xml.namespace.QName BPACCTINFO$8 = 
        new javax.xml.namespace.QName("", "BPACCTINFO");
    private static final javax.xml.namespace.QName INVACCTINFO$10 = 
        new javax.xml.namespace.QName("", "INVACCTINFO");
    private static final javax.xml.namespace.QName PRESACCTINFO$12 = 
        new javax.xml.namespace.QName("", "PRESACCTINFO");
    
    
    /**
     * Gets the "DESC" element
     */
    public java.lang.String getDESC()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DESC$0, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "DESC" element
     */
    public net.ofx.types.x2003.x04.ShortMessageType xgetDESC()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.ShortMessageType target = null;
            target = (net.ofx.types.x2003.x04.ShortMessageType)get_store().find_element_user(DESC$0, 0);
            return target;
        }
    }
    
    /**
     * True if has "DESC" element
     */
    public boolean isSetDESC()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(DESC$0) != 0;
        }
    }
    
    /**
     * Sets the "DESC" element
     */
    public void setDESC(java.lang.String desc)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DESC$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DESC$0);
            }
            target.setStringValue(desc);
        }
    }
    
    /**
     * Sets (as xml) the "DESC" element
     */
    public void xsetDESC(net.ofx.types.x2003.x04.ShortMessageType desc)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.ShortMessageType target = null;
            target = (net.ofx.types.x2003.x04.ShortMessageType)get_store().find_element_user(DESC$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.ShortMessageType)get_store().add_element_user(DESC$0);
            }
            target.set(desc);
        }
    }
    
    /**
     * Unsets the "DESC" element
     */
    public void unsetDESC()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(DESC$0, 0);
        }
    }
    
    /**
     * Gets the "PHONE" element
     */
    public java.lang.String getPHONE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PHONE$2, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "PHONE" element
     */
    public net.ofx.types.x2003.x04.PhoneType xgetPHONE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PhoneType target = null;
            target = (net.ofx.types.x2003.x04.PhoneType)get_store().find_element_user(PHONE$2, 0);
            return target;
        }
    }
    
    /**
     * True if has "PHONE" element
     */
    public boolean isSetPHONE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(PHONE$2) != 0;
        }
    }
    
    /**
     * Sets the "PHONE" element
     */
    public void setPHONE(java.lang.String phone)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PHONE$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PHONE$2);
            }
            target.setStringValue(phone);
        }
    }
    
    /**
     * Sets (as xml) the "PHONE" element
     */
    public void xsetPHONE(net.ofx.types.x2003.x04.PhoneType phone)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PhoneType target = null;
            target = (net.ofx.types.x2003.x04.PhoneType)get_store().find_element_user(PHONE$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.PhoneType)get_store().add_element_user(PHONE$2);
            }
            target.set(phone);
        }
    }
    
    /**
     * Unsets the "PHONE" element
     */
    public void unsetPHONE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(PHONE$2, 0);
        }
    }
    
    /**
     * Gets array of all "BANKACCTINFO" elements
     */
    public net.ofx.types.x2003.x04.BankAccountInfo[] getBANKACCTINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(BANKACCTINFO$4, targetList);
            net.ofx.types.x2003.x04.BankAccountInfo[] result = new net.ofx.types.x2003.x04.BankAccountInfo[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "BANKACCTINFO" element
     */
    public net.ofx.types.x2003.x04.BankAccountInfo getBANKACCTINFOArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccountInfo target = null;
            target = (net.ofx.types.x2003.x04.BankAccountInfo)get_store().find_element_user(BANKACCTINFO$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "BANKACCTINFO" element
     */
    public int sizeOfBANKACCTINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(BANKACCTINFO$4);
        }
    }
    
    /**
     * Sets array of all "BANKACCTINFO" element
     */
    public void setBANKACCTINFOArray(net.ofx.types.x2003.x04.BankAccountInfo[] bankacctinfoArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(bankacctinfoArray, BANKACCTINFO$4);
        }
    }
    
    /**
     * Sets ith "BANKACCTINFO" element
     */
    public void setBANKACCTINFOArray(int i, net.ofx.types.x2003.x04.BankAccountInfo bankacctinfo)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccountInfo target = null;
            target = (net.ofx.types.x2003.x04.BankAccountInfo)get_store().find_element_user(BANKACCTINFO$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(bankacctinfo);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "BANKACCTINFO" element
     */
    public net.ofx.types.x2003.x04.BankAccountInfo insertNewBANKACCTINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccountInfo target = null;
            target = (net.ofx.types.x2003.x04.BankAccountInfo)get_store().insert_element_user(BANKACCTINFO$4, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "BANKACCTINFO" element
     */
    public net.ofx.types.x2003.x04.BankAccountInfo addNewBANKACCTINFO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccountInfo target = null;
            target = (net.ofx.types.x2003.x04.BankAccountInfo)get_store().add_element_user(BANKACCTINFO$4);
            return target;
        }
    }
    
    /**
     * Removes the ith "BANKACCTINFO" element
     */
    public void removeBANKACCTINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(BANKACCTINFO$4, i);
        }
    }
    
    /**
     * Gets array of all "CCACCTINFO" elements
     */
    public net.ofx.types.x2003.x04.CreditCardAccountInfo[] getCCACCTINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(CCACCTINFO$6, targetList);
            net.ofx.types.x2003.x04.CreditCardAccountInfo[] result = new net.ofx.types.x2003.x04.CreditCardAccountInfo[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "CCACCTINFO" element
     */
    public net.ofx.types.x2003.x04.CreditCardAccountInfo getCCACCTINFOArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CreditCardAccountInfo target = null;
            target = (net.ofx.types.x2003.x04.CreditCardAccountInfo)get_store().find_element_user(CCACCTINFO$6, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "CCACCTINFO" element
     */
    public int sizeOfCCACCTINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(CCACCTINFO$6);
        }
    }
    
    /**
     * Sets array of all "CCACCTINFO" element
     */
    public void setCCACCTINFOArray(net.ofx.types.x2003.x04.CreditCardAccountInfo[] ccacctinfoArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(ccacctinfoArray, CCACCTINFO$6);
        }
    }
    
    /**
     * Sets ith "CCACCTINFO" element
     */
    public void setCCACCTINFOArray(int i, net.ofx.types.x2003.x04.CreditCardAccountInfo ccacctinfo)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CreditCardAccountInfo target = null;
            target = (net.ofx.types.x2003.x04.CreditCardAccountInfo)get_store().find_element_user(CCACCTINFO$6, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(ccacctinfo);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "CCACCTINFO" element
     */
    public net.ofx.types.x2003.x04.CreditCardAccountInfo insertNewCCACCTINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CreditCardAccountInfo target = null;
            target = (net.ofx.types.x2003.x04.CreditCardAccountInfo)get_store().insert_element_user(CCACCTINFO$6, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "CCACCTINFO" element
     */
    public net.ofx.types.x2003.x04.CreditCardAccountInfo addNewCCACCTINFO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CreditCardAccountInfo target = null;
            target = (net.ofx.types.x2003.x04.CreditCardAccountInfo)get_store().add_element_user(CCACCTINFO$6);
            return target;
        }
    }
    
    /**
     * Removes the ith "CCACCTINFO" element
     */
    public void removeCCACCTINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(CCACCTINFO$6, i);
        }
    }
    
    /**
     * Gets array of all "BPACCTINFO" elements
     */
    public net.ofx.types.x2003.x04.BillPaymentAccountInfo[] getBPACCTINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(BPACCTINFO$8, targetList);
            net.ofx.types.x2003.x04.BillPaymentAccountInfo[] result = new net.ofx.types.x2003.x04.BillPaymentAccountInfo[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "BPACCTINFO" element
     */
    public net.ofx.types.x2003.x04.BillPaymentAccountInfo getBPACCTINFOArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BillPaymentAccountInfo target = null;
            target = (net.ofx.types.x2003.x04.BillPaymentAccountInfo)get_store().find_element_user(BPACCTINFO$8, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "BPACCTINFO" element
     */
    public int sizeOfBPACCTINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(BPACCTINFO$8);
        }
    }
    
    /**
     * Sets array of all "BPACCTINFO" element
     */
    public void setBPACCTINFOArray(net.ofx.types.x2003.x04.BillPaymentAccountInfo[] bpacctinfoArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(bpacctinfoArray, BPACCTINFO$8);
        }
    }
    
    /**
     * Sets ith "BPACCTINFO" element
     */
    public void setBPACCTINFOArray(int i, net.ofx.types.x2003.x04.BillPaymentAccountInfo bpacctinfo)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BillPaymentAccountInfo target = null;
            target = (net.ofx.types.x2003.x04.BillPaymentAccountInfo)get_store().find_element_user(BPACCTINFO$8, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(bpacctinfo);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "BPACCTINFO" element
     */
    public net.ofx.types.x2003.x04.BillPaymentAccountInfo insertNewBPACCTINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BillPaymentAccountInfo target = null;
            target = (net.ofx.types.x2003.x04.BillPaymentAccountInfo)get_store().insert_element_user(BPACCTINFO$8, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "BPACCTINFO" element
     */
    public net.ofx.types.x2003.x04.BillPaymentAccountInfo addNewBPACCTINFO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BillPaymentAccountInfo target = null;
            target = (net.ofx.types.x2003.x04.BillPaymentAccountInfo)get_store().add_element_user(BPACCTINFO$8);
            return target;
        }
    }
    
    /**
     * Removes the ith "BPACCTINFO" element
     */
    public void removeBPACCTINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(BPACCTINFO$8, i);
        }
    }
    
    /**
     * Gets array of all "INVACCTINFO" elements
     */
    public net.ofx.types.x2003.x04.InvestmentAccountInfo[] getINVACCTINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(INVACCTINFO$10, targetList);
            net.ofx.types.x2003.x04.InvestmentAccountInfo[] result = new net.ofx.types.x2003.x04.InvestmentAccountInfo[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "INVACCTINFO" element
     */
    public net.ofx.types.x2003.x04.InvestmentAccountInfo getINVACCTINFOArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentAccountInfo target = null;
            target = (net.ofx.types.x2003.x04.InvestmentAccountInfo)get_store().find_element_user(INVACCTINFO$10, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "INVACCTINFO" element
     */
    public int sizeOfINVACCTINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(INVACCTINFO$10);
        }
    }
    
    /**
     * Sets array of all "INVACCTINFO" element
     */
    public void setINVACCTINFOArray(net.ofx.types.x2003.x04.InvestmentAccountInfo[] invacctinfoArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(invacctinfoArray, INVACCTINFO$10);
        }
    }
    
    /**
     * Sets ith "INVACCTINFO" element
     */
    public void setINVACCTINFOArray(int i, net.ofx.types.x2003.x04.InvestmentAccountInfo invacctinfo)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentAccountInfo target = null;
            target = (net.ofx.types.x2003.x04.InvestmentAccountInfo)get_store().find_element_user(INVACCTINFO$10, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(invacctinfo);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "INVACCTINFO" element
     */
    public net.ofx.types.x2003.x04.InvestmentAccountInfo insertNewINVACCTINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentAccountInfo target = null;
            target = (net.ofx.types.x2003.x04.InvestmentAccountInfo)get_store().insert_element_user(INVACCTINFO$10, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "INVACCTINFO" element
     */
    public net.ofx.types.x2003.x04.InvestmentAccountInfo addNewINVACCTINFO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentAccountInfo target = null;
            target = (net.ofx.types.x2003.x04.InvestmentAccountInfo)get_store().add_element_user(INVACCTINFO$10);
            return target;
        }
    }
    
    /**
     * Removes the ith "INVACCTINFO" element
     */
    public void removeINVACCTINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(INVACCTINFO$10, i);
        }
    }
    
    /**
     * Gets array of all "PRESACCTINFO" elements
     */
    public net.ofx.types.x2003.x04.PresentmentAccountInfo[] getPRESACCTINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(PRESACCTINFO$12, targetList);
            net.ofx.types.x2003.x04.PresentmentAccountInfo[] result = new net.ofx.types.x2003.x04.PresentmentAccountInfo[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "PRESACCTINFO" element
     */
    public net.ofx.types.x2003.x04.PresentmentAccountInfo getPRESACCTINFOArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PresentmentAccountInfo target = null;
            target = (net.ofx.types.x2003.x04.PresentmentAccountInfo)get_store().find_element_user(PRESACCTINFO$12, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "PRESACCTINFO" element
     */
    public int sizeOfPRESACCTINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(PRESACCTINFO$12);
        }
    }
    
    /**
     * Sets array of all "PRESACCTINFO" element
     */
    public void setPRESACCTINFOArray(net.ofx.types.x2003.x04.PresentmentAccountInfo[] presacctinfoArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(presacctinfoArray, PRESACCTINFO$12);
        }
    }
    
    /**
     * Sets ith "PRESACCTINFO" element
     */
    public void setPRESACCTINFOArray(int i, net.ofx.types.x2003.x04.PresentmentAccountInfo presacctinfo)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PresentmentAccountInfo target = null;
            target = (net.ofx.types.x2003.x04.PresentmentAccountInfo)get_store().find_element_user(PRESACCTINFO$12, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(presacctinfo);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "PRESACCTINFO" element
     */
    public net.ofx.types.x2003.x04.PresentmentAccountInfo insertNewPRESACCTINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PresentmentAccountInfo target = null;
            target = (net.ofx.types.x2003.x04.PresentmentAccountInfo)get_store().insert_element_user(PRESACCTINFO$12, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "PRESACCTINFO" element
     */
    public net.ofx.types.x2003.x04.PresentmentAccountInfo addNewPRESACCTINFO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PresentmentAccountInfo target = null;
            target = (net.ofx.types.x2003.x04.PresentmentAccountInfo)get_store().add_element_user(PRESACCTINFO$12);
            return target;
        }
    }
    
    /**
     * Removes the ith "PRESACCTINFO" element
     */
    public void removePRESACCTINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(PRESACCTINFO$12, i);
        }
    }
}
